package com.my.test.classpath;

import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class Start {

    public static void main(String[] args) {

        Start start = new Start();
        ClassLoader classLoader = start.getClass().getClassLoader();

        InputStream inputStream = classLoader.getResourceAsStream("config.properties");
        Properties properties = new Properties();
        try {
            properties.load(inputStream);
        } catch (IOException e) {
            e.printStackTrace();
        }
        String name = properties.getProperty("name");
        System.out.println(name);

    }
}
